//
//  LoadingView.m
//  GroupDeal
//
//  Created by lewang on 14-7-9.
//  Copyright (c) 2014年 groupdeal. All rights reserved.
//

#import "LoadingView.h"



static LoadingView *_loadingView;

@implementation LoadingView

#pragma life cycle
+(LoadingView *)shareLoadingView
{
    @synchronized(self){  //为了确保多线程情况下，仍然确保实体的唯一性
        
        if (!_loadingView)
        {
            //该方法会调用 allocWithZone
            _loadingView = [[LoadingView alloc] init];
        }
    }
    return  _loadingView;
}


+(id)allocWithZone:(NSZone *)zone
{
    @synchronized(self)
    {
        if (!_loadingView)
        {
            _loadingView = [super allocWithZone:zone]; //确保使用同一块内存地址
            return _loadingView;
        }
    }
    
    return nil;
}


- (id)init {
    self = [super init];
    if (self) {
       

    }
    return self;
}


- (BOOL)isSysIos7Later
{
        // return NO;
    
    if([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
        return YES;
    return NO;
}

- (BOOL)isSysIos8Later
{
        // return NO;
    
    if([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
        return YES;
    return NO;
}

- (BOOL)isSysIos8LessThanLater
{
        // return NO;
    
    if([[[UIDevice currentDevice] systemVersion] floatValue] <8.0)
        return YES;
    return NO;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
